#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int N,i;
	int H[1000], W[1000]; 
	scanf("%d", &N);
	for (i = 0; i < N; i++)
	{
		scanf("%d %d", &H[i], &W[i]);
	}
	for (i = 0; i < N; i++)
	{
		double std = 2*(H[i] - 100) * 0.9;
		if (fabs(W[i] - std) < std * 0.1)
		{
			printf("You are wan mei!\n");
		}
		else if (W[i] < std)
		{
			printf("You are tai shou le!\n");
		}
		else if (W[i] > std)
		{
			printf("You are tai pang le!\n");
		}
	}
}